/*
 * Author  : Mani Shankar Pampana V
 * Email   : manishankar.pv@gmail.com
 * Licence : GPLv2 or Above
 * File    : lex.l
 *
 * Unfortunately this code is not 
 * commented Doxygen friendly :P
 */

%{
#include "y.tab.h"
extern int yylval;
%}

identifier $?_?[a-zA-Z][_0-9a-zA-Z]+
number -?[0-9]*.?[0-9]+
integer [0-9]+

%%
[ \t\n]+                      {;}    //Ignore Spaces,tabs
[;{]                          {yylval=yytext; return EOP;}
[*]{identifier}  {yylval=yytext; return DEREF;}
[*]{identifier}"["{integer}"]"                 {yylval=yytext; return DARRAY;}
{identifier}"["[0-9]+"]"                    {yylval=yytext; return ARRAY;}
{identifier}"["{identifier}"]" {yylval=yytext; return IARRAY;}
{identifier}     {yylval=yytext; return IDENTIFIER;}
{number}              {yylval=yytext; return NUMBER;}
[+*/-]                        {yylval=yytext; return OPERATION;}
[=.]                          {return *yytext;}
"->"                          {return *yytext;}
.                             {;}
%%










